
<!DOCTYPE html>
<html>
<!--Made By kailuosoft.com, TEL 171 9992 9517 -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>凯络科技后台管理系统 - 宝贝绑定</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/css/new.css" rel="stylesheet">
	
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                           <h5>宝贝绑定</h5>
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal m-t" id="commentForm" action="{:U('Index/user_add')}" method="post">
                           <table class="table table-bordered table-striped table-hover">
                               <tr>
                                  <td>宝贝名称</td>
                                  <td>{$info.title}</td>
                               </tr>
                               <tr>
                                  <td>SKU</td>
                                  <td>{$info.properties_name}</td>
                               </tr>
                               <tr>
                                  <td>流量包类型</td>
                                  <td>
                                     <foreach name='proinfo' item='product'>
                                        <input type='radio' name='product'>{$product.gprs} &nbsp
                                     </foreach>
                                  </td>
                               </tr>
                               <tr>
                                  <td>赠送条件</td>
                                  <td>
                                      <input type='radio' name='condition'>好评赠送 &nbsp
                                      <input type='radio' name='condition'>付款赠送 &nbsp
                                      <input type='radio' name='condition'>好评带图赠送 &nbsp
                                      <input type='radio' name='condition'>20字好评 &nbsp
                                      <input type='radio' name='condition'>金额满送 &nbsp
                                  </td>
                               </tr>
                           </table>
							
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="__PUBLIC__/js/jquery.min63b9.js?v=2.1.4"></script>
    <script src="__PUBLIC__/js/bootstrap.min14ed.js?v=3.3.6"></script>
    <script src="__PUBLIC__/js/content.mine209.js?v=1.0.0"></script>
    <script src="__PUBLIC__/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="__PUBLIC__/js/plugins/validate/messages_zh.min.js"></script>
    <script src="__PUBLIC__/js/demo/form-validate-demo.min.js"></script>
    <script src="__PUBLIC__/js/plugins/layer/layer.min.js"></script>
   

<script>
    $('#submit').click(function(event){
		 event.preventDefault();
		 event.stopPropagation();
		
		 var id=$('#id').val();
		 var username=$('#username').val();
		 var password=$('#password').val();
		 var email=$('#cemail').val();
		 var phone=$('#phone').val();
		 
		 user_error=$('#username-error').text();
		 pw_error=$('#password-error').text();
		 email_error=$('#cemail-error').text();
		 
		 info="{$res4}";
		 if(username=='')
		 {   
			 return false;
		 }
		 if(user_error!='' || pw_error!='' || email_error!='')
		 {
			 return false;
		 }
		 if(info=='' && password=='')
		 {
			 return false;
		 }
		 
		 $.ajax({
			 //url: '{:U("Admin/admin_add")}',
			 url: '/index.php/home/index/user_update',
			 type:'POST',
			 data:'id='+id+'&username='+username+'&password='+password+'&email='+email+'&phone='+phone,
			 success:function(data){
				if(data==0){
					layer.alert('新增失败','',function(){location.href='user_list'});
				}else if(data==1){
					layer.alert('新增成功','',function(){location.href='user_list'});
				}else if(data==2){
				
					layer.alert('修改成功','',function(){self.location=document.referrer;});
				}else if(data==3){
					console.log($data);return false;
					layer.alert('修改失败','',function(){self.location=document.referrer;});
				}else if(data==4){
					layer.alert('该用户名已存在');
				}
			}
		 })
	})
</script>

</body>
<!--Made By kailuosoft.com, TEL 171 9992 9517 -->
<script  type="text/javascript"  src="http://g.tbcdn.cn/sj/securesdk/0.0.3/securesdk_v2.js"  id="J_secure_sdk_v2" data-appkey="23416550"></script>
</html>
